package com.ssh.service.Impl;

import com.ssh.dao.EmployeeDao;
import com.ssh.domain.Employee;
import com.ssh.service.EmployeeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * Created by H-209-FX-XY on 2018/4/12.
 */
@Service
public class EmployeeServiceImpl implements EmployeeService {

    @Autowired
    EmployeeDao employeeDao;

    @Override
    public Employee login(Employee employee) {
        employeeDao.findByUsernameAndPassword(employee);
        return null;
    }

    @Override
    public void save(Employee employee) {
        employeeDao.save(employee);
    }

    @Override
    public void updateByUsername(Employee employee) {

    }

    @Override
    public void deleteByUsername(Employee employee) {

    }

    @Override
    public List<Employee> findByUsername(Employee employee) {
        return employeeDao.findByUsername(employee);
    }
}
